﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="crm.aplicacao.Login" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body style="background-color: Silver">
    <div>
        <img src="CRMSystem/Imagem/logo.png" />
    </div>
    <div>
        <center>
            <div style="margin-top: -22%">
                <form id="form1" runat="server">
                <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Gray" />
                <ext:FormPanel ID="frmLogin" runat="server" Title="Controle de Acesso <img src='CRMSystem/Imagem/logoMn.png' />" Width="260"
                    Height="140" Padding="14" MonitorValid="true" BodyStyle="background-color: #EFEFEF"
                    Icon="Lock" LabelWidth="60" Frame="true">
              <Items>
                        <ext:TextField ID="txtUsuario" runat="server" FieldLabel="Email" AllowBlank="false"
                            MsgTarget="Side" MaxLength="20" Width="150"/>
                        <ext:TextField ID="txtSenha" runat="server" InputType="Password" FieldLabel="Senha"
                            AllowBlank="false" MsgTarget="Side" MaxLength="12" MinLength="3" Width="150" />
                    </Items>
                    <Buttons>
                        <ext:Button ID="LoginButton" runat="server" Text="Entrar">
                            <Listeners>
                                <Click Handler="if (#{frmLogin}.getForm().isValid()) { #{DirectMethods}.loginEnter(); }" />
                            </Listeners>
                        </ext:Button>
                    </Buttons>
                    <KeyMap>
                        <ext:KeyBinding>
                            <Keys>
                                <ext:Key Code="ENTER" />
                            </Keys>
                            <Listeners>
                                <Event Handler="if (#{frmLogin}.getForm().isValid()) { #{DirectMethods}.loginEnter(); }" />
                            </Listeners>
                        </ext:KeyBinding>
                    </KeyMap>
                </ext:FormPanel>
                </form>
            </div>
        </center>
    </div>
</body>
</html>
